<template>
	<view class="staticBannner">
		<view class="content">
			<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
				<swiper-item v-for="item in BannerList" :key="item._id" >
					<image :src="item.url" mode="" @click="changePath(item.link)" ></image>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				BannerList: []
			}
		},
		mounted() {
			this.getStaticBanner()
		},
		methods: {
			// 获取静态海报
			async getStaticBanner() {
				let res = await this.$Request("/showStaticBanner","")
				let code = res.data.code 
				if(code == 200) {
					this.BannerList = res.data.data
				}
			},
		}
	}
</script>

<style scoped lang="scss">
	.staticBannner {
		width: 100%;
		padding: 10rpx 25rpx;
		box-sizing: border-box;
		.content {
			width: 100%;
			border-radius: 60rpx;
			overflow: hidden;
			border: 1px solid #000;
			height: 140rpx;
			.swiper {
				width: 100%;
				image {
					width: 100%;
					height: 140rpx;
				}
			}
		}
	}
</style>
